from base import *

DEBUG=False
ADMINS = (
    ('heyulin', 'heyulin@smalltreemedia.com'),
    ('david.dai','david.dai@smalltreemedia.com')
)
ALLOWED_HOSTS=['apg.stm.com']
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        # 'NAME': 'test_pts',                      # Or path to database file if using sqlite3.
        'NAME': 'db_apg',#'pts_37','moki_pts',#
        # The following settings are not used with sqlite3:
        'USER': 'db_apg',
        'PASSWORD': 'db_apg',
        'HOST': '127.0.0.1',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '3306',                      # Set to empty string for default.
    }
}

ROUT_MEDIA=False     # is django root the media file. if nginx is exist ,this should False

# REDIS={
    # 'host':'localhost',
    # 'port':'6379',
    # 'db':'5'
# }

PS_DOMAIN='http://ps.mokitech.com'
PTS_DOMAIN='http://pts.mokitech.com'
APG_DOMAIN='apg.stm.com'
ALLOW_DEPLOY=True  # is allow deploy to google cloud

SUB_DOC='/mnt/APG_NETWORK_DRIVE'   # Resource Network Driver mount path

GC_SDK='/home/develop/google-cloud-sdk/bin'  # google cloud SDK


# from datetime import timedelta

# CELERYBEAT_SCHEDULE = {
    # 'add-every-30-seconds': {
        # 'task': 'studio.tasks.auto_deploy_with_celery',
        # 'schedule': timedelta(seconds=20*60),
        # 'args': (),
    # },
# }

from celery.schedules import crontab
CELERYBEAT_SCHEDULE = {
    # Executes every Monday morning at 2:00 A.M
    'autodeploy-every-morning': {
        'task': 'studio.tasks.auto_deploy_with_celery',
        'schedule': crontab(hour=2, minute=0),
        'args': (),
    },
}